<?php
session_start();
      if (isset($_SESSION['k_username'])) {
include ("conexion.inc.php");
$link = Conectarse();
$editadopor=$_SESSION['k_username'];
$fecha = date("y-m-d");
$hora= date("h:i:s");
mysql_select_db("gotica_sociosgotica",$link);
$sqll="INSERT INTO llamado (idsocio , hoy, llamado, llamadopor, horallamada) VALUES ('$_POST[valor]', '$fecha', \"1\",'$editadopor','$hora')";
$resulta = mysql_query($sqll);
echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index2.php\"";
echo "</SCRIPT>";
?>
<?
}else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>